package com.qqbot.impl.exception.code;


/**
 * 错误码
 *
 * @author changwenpeng
 */
public enum BaseResponseCode implements ResponseCodeInterface {
    /**
     * 错误码
     */
    SUCCESS(0, "操作成功"),
    SYSTEM_BUSY(500001, "系统繁忙，请稍候再试"),
    OPERATION_ERRO(500002, "操作失败"),
    APPID_ERROR(500003, "appId错误"),
    TIMESTAMP_ERROR(500005, "timestamp时间戳格式错误"),
    SIGN_ERROR(500004, "签名错误"),
    SIGN_TIMEOUT_ERROR(500006, "签名已经过期"),
    PARAM_ERROR(500007, "参数错误");

    /**
     * 错误码
     */
    private final int code;
    /**
     * 错误消息
     */
    private final String msg;

    BaseResponseCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
